﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.ServiceModel;
using ListenMusic.Message_ServiceReference;
using ListenMusic.Models.Reposistory.User;
namespace ListenMusic.Controllers.User
{
    public class MessageController : Controller
    {
        //
        // GET: /Message/
        MessageResposistory _message;
        public MessageController()
        {
            _message = new MessageResposistory();
        }
        public ActionResult LoadMessageByUser(string username, string type)
        {
            try
            {
               return Json(_message.LoadMessageByUser(username, "Friend"));
            }
            catch (FaultException ex)
            {
                throw new FaultException(ex.Message);
            }
            
        }

    }
}
